package com.bookmall.member.web;

import com.bookmall.member.domain.vo.PersonInfoVo;
import com.bookmall.member.domain.vo.PersonParamVo;
import com.bookmall.member.service.IMemberInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @Description:
 * @Author 胡菜鸡
 * @Create 2022-04-26-17:57
 */
@Controller
public class PersonCenterController {
    @Autowired
    private IMemberInfoService memberInfoService;

    /**
     * 前往个人中心
     * @author 胡菜鸡
     * @date 2022/4/27 17:20
     */
    @GetMapping("/center.html")
    public String center(PersonParamVo personParamVo, Model model){
        PersonInfoVo personInfoVo = memberInfoService.getPersonInfo(personParamVo);
        model.addAttribute("personInfo", personInfoVo);
        return "center";
    }
}
